import unittest

from just_pipeline.immutable import immutable_args


class Testimmutable(unittest.TestCase):
    def test_immutable_args(self):
        def foo(ls: list):
            return ls

        @immutable_args
        def foo_immutable(ls: list):
            return ls

        ls = [1, 2]
        self.assertEqual(id(ls), id(foo(ls)))
        self.assertNotEqual(id(ls), id(foo_immutable(ls)))
